package cn.liulin.spring_boot_study.self;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

/**
 * cn.liulin.spring_boot_study.self$
 *
 * @author ll
 * @date 2021-10-22 15:26:36
 **/
@Component
@ConfigurationProperties("database")
@PropertySource(value = "classpath:jdbc.properties", ignoreResourceNotFound = true)
public class DataBasePropertiesTwo {
    private String driverName;
    private String url;
    private String username;
    private String password;

    public void setDriverName(String driverName) {
        System.out.println(driverName);
        this.driverName = driverName;
    }

    public void setUrl(String url) {
        System.out.println(url);
        this.url = url;
    }

    public void setUsername(String username) {
        System.out.println(username);
        this.username = username;
    }

    public void setPassword(String password) {
        System.out.println(password);
        this.password = password;
    }

    public String getDriverName() {
        return driverName;
    }

    public String getUrl() {
        return url;
    }

    public String getUsername() {
        return username;
    }

    public String getPassword() {
        return password;
    }
}
